#include "tile.h"
#include "tiletype.h"

using namespace sf;

Tile::Tile(const SpriteRef& spriteRef, TileType type)
    : m_spriteRef(spriteRef), m_type(type)
{
    QRect rect = spriteRef.getSubRect();
}

TileType Tile::getType() const
{
    return m_type;
}

void Tile::setType(TileType type)
{
    m_type = type;
}

TileTypeProperties Tile::getProperties() const
{
    return TileTypeFactory::getInstance().getTileProperties(m_type);
}

quint8 Tile::getPracticability(UnitType unitType) const
{
    return TileTypeFactory::getInstance().getPracticability(m_type, unitType);
}

const SpriteRef& Tile::getSpriteRef() const
{
    return m_spriteRef;
}
